using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Interpolation
{
    /// <summary>
    /// <para>Topo to Raster by File</para>
    /// <para>Interpolates a hydrologically correct raster surface from point, line, and polygon data using parameters specified in a file.</para>
    /// <para>使用文件中指定的参数从点、线和面数据中插值水文正确的栅格表面。</para>
    /// </summary>    
    [DisplayName("Topo to Raster by File")]
    public class TopoToRasterByFile : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public TopoToRasterByFile()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_parameter_file">
        /// <para>Input parameter file</para>
        /// <para><xdoc>
        ///   <para>The input ASCII text file containing the inputs and parameters to use for the interpolation.</para>
        ///   <para>The file is typically created from a previous run of Topo to Raster with the optional output parameter file specified.</para>
        ///   <para>In order to test the outcome of changing the parameters, it is easier to make edits to this file and rerun the interpolation than to correctly issue the Topo to Raster tool each time.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入 ASCII 文本文件，其中包含用于插值的输入和参数。</para>
        ///   <para>该文件通常是从上一次运行的拓扑到栅格创建的，并指定了可选的输出参数文件。</para>
        ///   <para>为了测试更改参数的结果，对该文件进行编辑并重新运行插值比每次都正确发出地形转栅格工具要容易得多。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_surface_raster">
        /// <para>Output surface raster</para>
        /// <para><xdoc>
        ///   <para>The output interpolated surface raster.</para>
        ///   <para>It is always a floating-point raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出插值表面栅格。</para>
        ///   <para>它始终是浮点栅格。</para>
        /// </xdoc></para>
        /// </param>
        public TopoToRasterByFile(object _in_parameter_file, object _out_surface_raster)
        {
            this._in_parameter_file = _in_parameter_file;
            this._out_surface_raster = _out_surface_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Topo to Raster by File";

        public override string CallName => "sa.TopoToRasterByFile";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "geographicTransformations", "maintainSpatialIndex", "mask", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "scratchWorkspace", "snapRaster", "tileSize", "transferDomains", "workspace"];

        public override object[] ParameterInfo => [_in_parameter_file, _out_surface_raster, _out_stream_features, _out_sink_features, _out_residual_feature, _out_stream_cliff_error_feature, _out_contour_error_feature];

        /// <summary>
        /// <para>Input parameter file</para>
        /// <para><xdoc>
        ///   <para>The input ASCII text file containing the inputs and parameters to use for the interpolation.</para>
        ///   <para>The file is typically created from a previous run of Topo to Raster with the optional output parameter file specified.</para>
        ///   <para>In order to test the outcome of changing the parameters, it is easier to make edits to this file and rerun the interpolation than to correctly issue the Topo to Raster tool each time.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输入 ASCII 文本文件，其中包含用于插值的输入和参数。</para>
        ///   <para>该文件通常是从上一次运行的拓扑到栅格创建的，并指定了可选的输出参数文件。</para>
        ///   <para>为了测试更改参数的结果，对该文件进行编辑并重新运行插值比每次都正确发出地形转栅格工具要容易得多。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input parameter file")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_parameter_file { get; set; }


        /// <summary>
        /// <para>Output surface raster</para>
        /// <para><xdoc>
        ///   <para>The output interpolated surface raster.</para>
        ///   <para>It is always a floating-point raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出插值表面栅格。</para>
        ///   <para>它始终是浮点栅格。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output surface raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_surface_raster { get; set; }


        /// <summary>
        /// <para>Output stream polyline features</para>
        /// <para><xdoc>
        ///   <para>Output feature class of stream polyline features.</para>
        ///   <para>The polyline features are coded as follows:</para>
        ///   <para>1. Input stream line not over cliff.</para>
        ///   <para>2. Input stream line over cliff (waterfall).</para>
        ///   <para>3. Drainage enforcement clearing a spurious sink.</para>
        ///   <para>4. Stream line determined from contour corner.</para>
        ///   <para>5. Ridge line determined from contour corner.</para>
        ///   <para>6. Code not used.</para>
        ///   <para>7. Data stream line side conditions.</para>
        ///   <para>8. Code not used.</para>
        ///   <para>9. Line indicating large elevation data clearance.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>流折线要素的输出要素类。</para>
        ///   <para>折线要素的编码如下：</para>
        ///   <para>1.输入流线不越过悬崖。</para>
        ///   <para>2.悬崖（瀑布）上的输入溪流线。</para>
        ///   <para>3. 排水执法清理虚假水槽。</para>
        ///   <para>4. 从等高线角确定的流线。</para>
        ///   <para>5. 从等高线角确定的脊线。</para>
        ///   <para>6. 未使用代码。</para>
        ///   <para>7.数据流线侧条件。</para>
        ///   <para>8. 未使用代码。</para>
        ///   <para>9. 表示大高程数据间隙的线。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output stream polyline features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_stream_features { get; set; } = null;


        /// <summary>
        /// <para>Output remaining sink point features</para>
        /// <para>Output feature class of remaining sink point features.</para>
        /// <para>剩余接收点要素的输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output remaining sink point features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_sink_features { get; set; } = null;


        /// <summary>
        /// <para>Output residual point features</para>
        /// <para><xdoc>
        ///   <para>The output point feature class of all the large elevation residuals as scaled by the local discretisation error.</para>
        ///   <para>All the scaled residuals larger than 10 should be inspected for possible errors in input elevation and stream data. Large-scaled residuals indicate conflicts between input elevation data and streamline data. These may also be associated with poor automatic drainage enforcements. These conflicts can be remedied by providing additional streamline and/or point elevation data after first checking and correcting errors in existing input data. Large unscaled residuals usually indicate input elevation errors.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>所有大高程残差的输出点要素类，按局部离散化误差进行缩放。</para>
        ///   <para>应检查所有大于 10 的缩放残差，以查找输入高程和流数据中可能存在的错误。大比例残差表示输入高程数据与流线数据之间存在冲突。这些也可能与自动排水执法不力有关。在首次检查和更正现有输入数据中的错误后，可以通过提供额外的流线和/或点高程数据来补救这些冲突。较大的未缩放残差通常表示输入高程误差。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output residual point features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_residual_feature { get; set; } = null;


        /// <summary>
        /// <para>Output stream and cliff error point features</para>
        /// <para><xdoc>
        ///   <para>The output point feature class of locations where possible stream and cliff errors occur.</para>
        ///   <para>The locations where the streams have closed loops, distributaries, and streams over cliffs can be identified from the point feature class. Cliffs with neighboring cells that are inconsistent with the high and low sides of the cliff are also indicated. This can be a good indicator of cliffs with incorrect direction.</para>
        ///   <para>Points are coded as follows:</para>
        ///   <para>1. True circuit in data streamline network.</para>
        ///   <para>2. Circuit in stream network as encoded on the out raster.</para>
        ///   <para>3. Circuit in stream network via connecting lakes.</para>
        ///   <para>4. Distributaries point.</para>
        ///   <para>5. Stream over a cliff (waterfall).</para>
        ///   <para>6. Points indicating multiple stream outflows from lakes.</para>
        ///   <para>7. Code not used.</para>
        ///   <para>8. Points beside cliffs with heights inconsistent with cliff direction.</para>
        ///   <para>9. Code not used.</para>
        ///   <para>10. Circular distributary removed.</para>
        ///   <para>11. Distributary with no inflowing stream.</para>
        ///   <para>12. Rasterized distributary in output cell different to where the data stream line distributary occurs.</para>
        ///   <para>13. Error processing side conditions—an indicator of very complex streamline data.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>可能发生溪流和悬崖错误的位置的输出点要素类。</para>
        ///   <para>可以从点要素类中识别溪流具有闭环、支流和悬崖上的溪流的位置。还标明了与悬崖高边和低边不一致的相邻单元的悬崖。这可能是方向不正确的悬崖的一个很好的指标。</para>
        ///   <para>点的编码如下：</para>
        ///   <para>1.数据流线网络中的真实电路。</para>
        ///   <para>2. 在输出栅格上编码的流网络中的电路。</para>
        ///   <para>3.通过连接湖泊的溪流网络电路。</para>
        ///   <para>4.分流点。</para>
        ///   <para>5.在悬崖（瀑布）上溪流。</para>
        ///   <para>6. 指示湖泊多条溪流流出的点。</para>
        ///   <para>7. 未使用代码。</para>
        ///   <para>8. 悬崖旁高度与悬崖方向不一致的点。</para>
        ///   <para>9. 未使用代码。</para>
        ///   <para>10.去掉了循环分流。</para>
        ///   <para>11.无流入的支流。</para>
        ///   <para>12. 输出单元中的栅格化分配点与数据流线分配点发生的位置不同。</para>
        ///   <para>13. 错误处理侧条件 - 非常复杂的流线型数据的指标。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output stream and cliff error point features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_stream_cliff_error_feature { get; set; } = null;


        /// <summary>
        /// <para>Output contour  error point features</para>
        /// <para><xdoc>
        ///   <para>The output point feature class of possible errors pertaining to the input contour data.</para>
        ///   <para>Contours with bias in height exceeding five times the standard deviation of the contour values as represented on the output raster are reported to this feature class. Contours that join other contours with a different elevation are flagged in this feature class by the code 1; this is a sure sign of a contour label error.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>与输入等值线数据相关的可能误差的输出点要素类。</para>
        ///   <para>高度偏差超过输出栅格上表示的等值线值标准差 5 倍的等值线将报告到此要素类。在此要素类中，连接具有不同高程的其他等值线的等值线由代码 1 标记;这是等值线标签错误的明确迹象。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output contour  error point features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_contour_error_feature { get; set; } = null;


        public TopoToRasterByFile SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object geographicTransformations = null, bool? maintainSpatialIndex = null, object mask = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, bool? transferDomains = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, maintainSpatialIndex: maintainSpatialIndex, mask: mask, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, transferDomains: transferDomains, workspace: workspace);
            return this;
        }

    }

}